package com.example.appmobile;

import android.os.Bundle;
import android.app.Activity;

import com.alorm.AlormEntityManagerFactory;
import com.alorm.AlormTemplate;
import com.alorm.core.sqlite.AlormSQLiteEntityManager;
import com.alorm.utils.AlormLogger;
import com.example.alormapp.R;

public class MainActivity extends Activity {

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		AlormLogger.info("demarrage");

		Livre l1 = new Livre("er", "ds");
		Livre l2 = new Livre("ff", "ds");

		AlormSQLiteEntityManager e = (AlormSQLiteEntityManager) AlormEntityManagerFactory
				.getInstance(this);

		AlormTemplate t = e.getAlormTemplate();

	

		t.save(l1);
		t.save(l2);

		t.delete(new Livre(1, "dsd", "dsd"));

	}

}
